//
//  WQFavorites.swift
//  WQWebData
//
//  Created by huwenqiang on 2019/11/25.
//  Copyright © 2019 huwenqiang. All rights reserved.
//

import UIKit
import HandyJSON

enum ProductDetailLoadStatus {
    case unLoad
    case failed
    case succeed
}

/// 产品详情模型
class WQFavorites: HandyJSON {

    required init() {}
    
    /// 优惠券描述/面额
    var coupon_info:String = ""
    /// 优惠券开始时间
    var coupon_start_time:String = ""
    /// 优惠券结束时间
    var coupon_end_time:String = ""
    /// 优惠券剩余数量
    var coupon_remain_count:Int = 0
    /// 宝贝状态，0失效，1有效；注：失效可能是宝贝已经下线或者是被处罚不能在进行推广
    var status:Int = 1
    /// 淘客地址
    var click_url:String = ""
    /// 优惠券分享链接主要的推广链接
    var coupon_click_url:String = ""
    /// 商品主图
    var pict_url:String = ""
    /// 商品标题
    var title:String = ""
    /// 商品ID
    var num_iid:Int = 0
    /// 商品小图列表
    var small_images:SmallImages?
    /// 商品一口价格
    var reserve_price:String = "0.00"
    /// 商品折扣价格
    var zk_final_price:String = "0.00"
    /// 30天销量
    var volume:Int = 0
    /// 新增 --- 详情字段
    var details:String = ""
    /// 新增 --- 判断是否正确获取到详情基本信息
    var loadProductBaseStatus:ProductDetailLoadStatus = .unLoad
    /// 新增获取详情图片数组的状态
    var productImagesArray:[String] = []
    var loadProductImagesStatus:ProductDetailLoadStatus = .unLoad
}

class SmallImages: HandyJSON {
    var string:[String] = []
    
    required init() {}
}

class WQFavoritesOther: HandyJSON {
    
    required init() {}
    
    var props:WQProps?
    var item:WQItem?
    
}


/// 商品基本信息
class WQProps: HandyJSON {
    var groupProps:[WQPropsItem] = []
    
    required init() {}
}

class WQPropsItem:HandyJSON {
    var 基本信息:[[String:Any]] = []
    required init() {}
}

/// 商品图片详情的链接获取
class WQItem: HandyJSON {
    var taobaoDescUrl:String = ""
    var tmallDescUrl:String = ""
    var taobaoPcDescUrl:String = ""
    /// 图片详情的请求链接
    var moduleDescUrl:String = ""
    var subtitle = ""
    
    required init() {}
}


///  详情页面的图片信息
class WQDetailPictures: HandyJSON {
    var children:[WQDetailPicturesItem] = []
    required init() {}
}

class WQDetailPicturesItem: HandyJSON {
    var ID:String = ""
    var key:String = ""
    var params:WQDetailPicturesParams?
    required init() {}
}

class WQDetailPicturesParams: HandyJSON {
    var childrenStyle:String = ""
    /// 详情图片地址
    var picUrl:String = ""
    required init() {}
}

